import { Injectable } from '@angular/core';
import { BaseService } from './base.service';
import { Md5 } from 'ts-md5';
@Injectable({
  providedIn: 'root'
})
export class LoginService extends BaseService {
  login(params: { username: string; password: string; }) {
    params.password = Md5.hashStr(params.password) as string;
    const url = 'api/signIn';
    return this.put(url, params);
  }
  SaveOrgPageItem(params) {
    const url = 'api/orgPageItem/page/type/login';
    return this.post(url, params);
  }

  getVerifyCode() {
    const url = 'api/verifyCode';
    return this.get(url);
  }
}
